package ma.co.ba.BusinessApplications.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "ETATS")
public class Etat implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;

	@Column(name = "LIBELLE_ETAT", length = 100)
	private String libelleEtat;

	@Column(name = "DESCRIPTION", length = 100)
	private String description;

	@OneToMany(mappedBy = "etat", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<DAT> dats;

	public Etat() {

	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLibelleEtat() {
		return libelleEtat;
	}

	public void setLibelleEtat(String libelleEtat) {
		this.libelleEtat = libelleEtat;
	}

	public List<DAT> getDats() {
		return dats;
	}

	public void setDats(List<DAT> dats) {
		this.dats = dats;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

}